package cn.initcap.designpattern.pattern.structural.bridge;

/**
 * 侨接模式
 *
 * @author initcap
 * @date 2018/8/28 AM9:12
 */
public class Test {
    public static void main(String[] args) {
        BaseBank icbcBaseBank = new IcbcBaseBank(new DepositAccount());
        Account icbcAccount = icbcBaseBank.openAccount();
        icbcAccount.showAccountType();

        BaseBank icbcBaseBank2 = new IcbcBaseBank(new SavingAccount());
        Account icbcAccount2 = icbcBaseBank2.openAccount();
        icbcAccount2.showAccountType();

        BaseBank abcBaseBank = new AbcBaseBank(new SavingAccount());
        Account abcAccount = abcBaseBank.openAccount();
        abcAccount.showAccountType();
    }
}
